home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / batch / batcher.zip / TMR-DEMO.BAT < prev    next >
DOS Batch File  |  1986-07-13  |  2KB  |  60 lines

  1. Echo Off
  2. If NOT '%1'=='' GOTO PARM
  3. CLS
  4. Echo ------------- TimeRead.Com  Demo Batch File --------------
  5. Echo     
  6. Echo      To use this Demonstration, invoke it by typing
  7. Echo        >>═══   'TR-DEMO filename.ext'   ═══<<
  8. Echo      from the DOS prompt.
  9. Echo    
  10. Echo      The filename you specify will be the one you want to
  11. Echo      ERASE.
  12. Echo    
  13. Echo      You will then be asked if you REALLY do want to 
  14. Echo      delete the file.
  15. Echo         If you answer 'Y' the file will be ERASEd.
  16. Echo         If you answer 'N' the ERASEure will be aborted.
  17. Echo         If you do not answer within 3 sec., the batch file
  18. Echo           will assume that you don't want to erase it.
  19. Echo    
  20. Echo    
  21. Echo    
  22. Pause
  23. CLS
  24. Echo                 ------- PROGRAM INFO --------
  25. Echo     
  26. Echo     Invoke TimeRead.Com by typing 'TIMEREAD' in your batch file.
  27. Echo      
  28. Echo      The program will wait 3 sec. for input and if a
  29. Echo         key has not been pressed in that time, it will return
  30. Echo         to the batch file with ERRORLEVEL set to 2.
  31. Echo      If the response from the keyboard was 'Y' or 'y' an
  32. Echo         ERRORLEVEL of 1 will be returned.
  33. Echo      If 'N' or 'n' was input, the ERRORLEVEL will be 0.
  34. Echo    
  35. Echo       When testing in your batch file for the ERRORLEVEL,
  36. Echo       ALWAYS test in decending order or it will not work.
  37. Echo       (i.e.  IF ERRORLEVEL 2....1....0...)
  38. GOTO END
  39. :PARM
  40. Echo     Are you sure you want to ERASE
  41. Echo                %1 ???
  42. TimeRead
  43. IF ERRORLEVEL 2 GOTO TIMEOUT
  44. IF ERRORLEVEL 1 GOTO YES
  45. IF ERRORLEVEL 0 GOTO NO
  46. GOTO END
  47. :TIMEOUT
  48. Echo          ( No input received....assuming 'NO' response.)
  49. GOTO NO
  50. :YES
  51. Echo       ERASEing %1..........
  52. ERASE %1
  53. Echo       ........%1 ERASEed!!
  54. GOTO END
  55. :NO
  56. Echo                ******  ERASE of %1 Aborted  ******
  57. GOTO END
  58. :END
  59. Echo ------- Demo Complete --------
  60. GOTO E